
cd

use "BMS_Rates.dta", clear

tsset date_month

generate month_no_collude = 1
replace  month_no_collude = 0 if year==1931 & month>=5 & month<=9

generate month_external = 0
replace  month_external = 1 if year==1924 & month>=4
replace  month_external = 1 if year==1925 & month<=1
replace  month_external = 1 if year==1928 & month>=2
replace  month_external = 1 if year==1929 & month<=9
replace  month_external = 1 if year==1931 & month>=10
replace  month_external = 1 if year==1932 & month==1


** TABLE 1

** Column 1
quietly reg d.Customer_NewYork d.FR_discount_rate_NY
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear

** Column 2
quietly reg d.Customer_NewYork d.FR_discount_rate_NY i.month
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY i.month
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear

** Column 3
quietly reg d.Customer_NewYork d.FR_discount_rate_NY i.month if d.FR_discount_rate_NY<=0.5 & d.FR_discount_rate_NY>=-0.5
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY i.month if d.FR_discount_rate_NY<=0.5 & d.FR_discount_rate_NY>=-0.5
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear

** Column 4
quietly reg d.Customer_NewYork d.FR_discount_rate_NY i.month if month_external==1
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY i.month if month_external==1
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear

** Column 5
quietly reg d.Customer_NewYork d.FR_discount_rate_NY i.month if month_no_collude==1
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY i.month if month_no_collude==1
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear

** Column 6
quietly reg d.Customer_NewYork d.FR_discount_rate_NY i.month if year>1921 & year<1930
est store m1
quietly reg d.Broker90day d.FR_discount_rate_NY i.month if year>1921 & year<1930
est store m2
suest m1 m2
test [m1_mean]D.FR_discount_rate_NY = [m2_mean]D.FR_discount_rate_NY
est clear


** TABLE 2

** Column 1
reg d.Broker90day L(0/6)d.FR_discount_rate_NY i.month, robust

** Column 2
reg d.Customer_NewYork L(0/6)d.FR_discount_rate_NY i.month, robust

** Column 3
reg d.Customer_NorthEast L(0/6)d.FR_discount_rate_Boston i.month, robust

** Column 4
reg d.Customer_SouthWest L(0/6)d.FR_discount_rate_Richmond i.month, robust

** Column 5
reg d.CommercePaper L(0/6)d.FR_discount_rate_NY i.month, robust


** FIGURE 1
line FR_discount_rate_NY date, lcolor(black) lwidth(medthick) || scatter Customer_NewYork date, msize(medsmall) mcolor(gs11) mfcolor(gs11) || scatter Broker90day date, msize(medsmall) mcolor(black) mfcolor(none)
